
package com.sasis.service.impl;

import java.util.List;

import com.sasis.service.impl.BaseManager;
import com.sasis.model.WorkLog;
import com.sasis.dao.WorkLogDao;
import com.sasis.service.WorkLogManager;

import com.sasis.util.PageList;
import com.sasis.util.PageRequest;

public class WorkLogManagerImpl extends BaseManager implements WorkLogManager {
    private WorkLogDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setWorkLogDao(WorkLogDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.sasis.service.WorkLogManager#getWorkLogs(com.sasis.model.WorkLog)
     */
    public List getWorkLogs(final WorkLog workLog) {
        return dao.getWorkLogs(workLog);
    }

    /**
     * @see com.sasis.service.WorkLogManager#getWorkLog(String id)
     */
    public WorkLog getWorkLog(final String id) {
        return dao.getWorkLog(new Integer(id));
    }

    /**
     * @see com.sasis.service.WorkLogManager#saveWorkLog(WorkLog workLog)
     */
    public void saveWorkLog(WorkLog workLog) {
        dao.saveWorkLog(workLog);
    }

    /**
     * @see com.sasis.service.WorkLogManager#removeWorkLog(String id)
     */
    public void removeWorkLog(final String id) {
        dao.removeWorkLog(new Integer(id));
    }
    public PageList queryForPageList(String listStatementId,  
    		Object parameterObject, PageRequest pageRequest){
	return dao.queryForPageList(listStatementId,   parameterObject, pageRequest);
    }
}
